import { defineFakeRoute } from "vite-plugin-fake-server/client";

export default defineFakeRoute([
    {
        url: "/querySecretList",
        method: "get",
        response: ({ query }) => {
            if(query.name === "A系统公钥"){
                return {
                    success: true,
                    data: [
                        {
                            id:"19745945837593942",
                            name: "A系统公钥",
                            type: "public",
                            state:0,
                            createdTime: new Date(),
                            modifiedTime: new Date(),
                        },
                    ]
                };
            }
            return {
                success: true,
                data: [
                    {
                        id:"19745945837593942",
                        name: "A系统公钥",
                        type: "public",
                        state:0,
                        createdTime: new Date(),
                        modifiedTime: new Date(),
                    },
                    {
                        id:"19745945837593943",
                        name: "B系统公钥",
                        type: "public",
                        state:1,
                        createdTime: new Date(),
                        modifiedTime: new Date(),
                    },
                    {
                        id:"19745945837593945",
                        name: "系统私钥A",
                        type: "private",
                        state:1,
                        createdTime: new Date(),
                        modifiedTime: new Date(),
                    }
                ]
            };
        }
    }
]);
